package yns.springcloud.oakwood.guide.circuitbreaker;

import java.time.LocalDateTime;

import org.springframework.stereotype.Component;

import yns.springcloud.oakwood.guide.bean.Order;
import yns.springcloud.oakwood.guide.bean.User;
import yns.springcloud.oakwood.guide.consumer.FeignConsumer;

@Component
public class FeignCircuitbreaker implements FeignConsumer {
	
	@Override
	public String consumerProducer(String value) {
		return "FeignCircuitbreaker fallbackMethod : consumerProducer";
	}

	@Override
	public Order consumerProducer2(User user) {
		Order order = new Order();
		order.setOrderId(LocalDateTime.now().toString());
		order.setDesc("FeignCircuitbreaker fallbackMethod : consumerProducer2");

		return order;
	}

	@Override
	public Order consumerProducer3(User user) {
		Order order = new Order();
		order.setOrderId(LocalDateTime.now().toString());
		order.setDesc("FeignCircuitbreaker fallbackMethod : consumerProducer3");

		return order;
	}

}
